Add Documentation for Preload Script#1031
Add Documentation for Preload Script#1031AeonSake wants to merge 4 commits intoElectronNET:developfrom
Conversation
|
|
||
| if (options.isRunningBlazor) { | ||
| options.webPreferences["preload"] = path.join( | ||
| if (options.isRunningBlazor && !options.webPreferences.preload) { |
There was a problem hiding this comment.
Does not make sense as isRunningBlazor only exists for this.
The warning should be printed that a preload script will be ignored if isRunningBlazor is set. The option, which has been turned on explicitly, should always have preference.
There was a problem hiding this comment.
Fine by me, I'll update the note in the documentation to reflect this.
|
This PR has been modified to only add new documentation to clarify how to handle preload scripts (and a note when using Blazor). |
|
We could make |
pr-comment: Run #42
🎉 All tests passed!Github Test Reporter by CTRF 💚 |
That would probably also be a good idea for user feedback, I can add that in another commit if wanted. |
That would be great. I assume that by "user", you mean the "developer consuming Electron.NET". Of course this exception is meant to warn developers; it should never surface to end-users of the application. |
Proposed changes for #1028
Adds a check for a user-defined preload script before manually overriding the path when running in Blazor-mode. This is technically a breaking change (since the behavior has changed) as preload scripts are now always executed. However, this most likely has no impact on existing applications as they would not have worked before this change anyway (i.e., when using a preload script in Blazor-mode).